<%@ page contentType="text/html;charset=utf-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>主页</title>
</head>
<body>
	<%
		String user = (String) session.getAttribute("user");
		if (user != null) {
			out.println("欢迎：" + user);
		} else {
	%>
	<form action="./login" method="post">
		用户名:<input type="text" name="user" /><br />
		密 码:<input type="password" name="password" /><br />
		<input type="submit" name="submit" value="登录" />
	</form>
	<%
		}
	%>
</body>
</html>
